import { Entity, Column, CreateDateColumn, OneToMany } from 'typeorm';
import { BaseEntity } from '../../../common/base.entity';
import { OrderManageEntity } from '../../orderManage/entity/orderManage';

@Entity('Room_manage')
export class RoomManageEntity extends BaseEntity {
  @Column({ comment: '名称' })
  name?: string;

  @Column({ comment: '类型' })
  type?: string;

  @Column({ comment: '状态' })
  status?: string;

  @Column({ comment: '单价' })
  price?: string;

  @Column({ comment: '预定状态' })
  ordered?: boolean

  @CreateDateColumn({ comment: '开始预约时间' })
  startUseDate?: Date;

  @CreateDateColumn({ comment: '结束预约时间' })
  endUseDate?: Date;

  @Column({ comment: '使用状态' })
  use_status?: string

  @OneToMany(() => OrderManageEntity, (order) => order.rooms)
  ordered_manage?: OrderManageEntity[];
}